package com.ustudy.entity.cms;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.ustudy.core.dao.support.entity.LongIdEntity;
import org.ustudy.core.dao.support.entity.StringIdEntity;

import com.ustudy.entity.commons.PagesTemplate;

/**
 * 文章类型
 */
@SuppressWarnings("serial")
@Entity(name="ArticleType")
@Table(name="CMS_ARTICLE_TYPE")
public class ArticleType extends StringIdEntity {
	
	private String code;
	
	private String name;

	@ManyToOne(cascade={CascadeType.REMOVE},fetch=FetchType.LAZY)
	@JoinColumn(name="TPTL_ID")
	private PagesTemplate pagesTemplate;
		
	public PagesTemplate getPagesTemplate() {
		return pagesTemplate;
	}

	public void setPagesTemplate(PagesTemplate pagesTemplate) {
		this.pagesTemplate = pagesTemplate;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
